import request from "@/utils/request";

// 查询商品议价列表
export function listBargain(query) {
  return request({
    url: "/commodity/bargain/list",
    method: "get",
    params: query,
  });
}

// 查询商品议价详细
export function getBargain(id) {
  return request({
    url: "/commodity/bargain/" + id,
    method: "get",
  });
}

// 新增商品议价
export function addBargain(data) {
  return request({
    url: "/commodity/bargain",
    method: "post",
    data: data,
  });
}

// 修改商品议价
export function updateBargain(data) {
  return request({
    url: "/commodity/bargain",
    method: "put",
    data: data,
  });
}

// 删除商品议价
export function delBargain(id) {
  return request({
    url: "/commodity/bargain/" + id,
    method: "delete",
  });
}
